import {
	request
} from '@/assets/request.js'
import { HTTP_FREIGHT_URL,HTTP_APP_URL} from '@/config/app';

let devGulz = HTTP_APP_URL; // app

let freightUrl = HTTP_FREIGHT_URL; // 货运接口


// 翻译工作
// export function state_work(data) { 
// 	return request({
// 		url: `${devGulz}/basic/state_work`,
// 		method: 'post',
// 		data: data
// 	})
// }

// 我买的列表
export function purchaseList(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/purchase_list`,
		method: 'post',
		data: data
	})
}

// 我买的列表详情
export function purchaseDetaile(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/purchase_detaile`,
		method: 'post',
		data: data
	})
}

// 我卖的列表
export function sellList(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/sell_list`,
		method: 'post',
		data: data
	})
}


// 我卖的列表详情
export function sellDetaile(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/sell_detaile`,
		method: 'post',
		data: data
	})
}

// 填报运费
export function upShippingFee(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/up_shipping_fee`,
		method: 'post',
		data: data
	})
}

// 上传支付凭证
export function upPaymentVoucher(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/up_payment_voucher`,
		method: 'post',
		data: data
	})
}


// 申请售后
export function addAfterSales(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/add_after_sales`,
		method: 'post',
		data: data
	})
}

// 修改售后
export function updateAfterSales(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/update_after_sales`,
		method: 'post',
		data: data
	})
}

// 卖家同意申请
export function sellerOperate(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/seller_operate`,
		method: 'post',
		data: data
	})
}

// 买家同意付款
export function confirmPay(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/confirm_pay`,
		method: 'post',
		data: data
	})
}


// 添加评价
export function addComment(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/add_comment`,
		method: 'post',
		data: data
	})
}


// 关联运踪
export function yuntraceUpdate(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/yuntrace_update`,
		method: 'post',
		data: data
	})
}


// 售后详情
export function afterSalesDetail(data) { 
	return request({
		url: `${freightUrl}/Purchaseorder/after_sales_detail`,
		method: 'post',
		data: data
	})
}


// 发货记录接口
export function getDeliveryRecord(data) { // 发货记录
	return request({
		url: `${freightUrl}/record/delivery_record`,
		method: 'post',
		data: data
	})
}